<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/chengpingku/warehouse/MES_Warehouse.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/chengpingku/warehouse/MES_Warehouse.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Id',
                footer: "Foots",
                cnName: '成品仓库',
                name: 'warehouse/MES_Warehouse',
                url: "/MES_Warehouse/",
                sortName: "Id"
            });
            const editFormFields = ref({"warehouse_no":"","warehouse_name":"","address":"","GongXuId":"","GongXuName":"","remark":""});
            const editFormOptions = ref([[{"title":"仓库编号","field":"warehouse_no"}],
                              [{"title":"仓库名称","field":"warehouse_name"}],
                              [{"title":"仓库位置","field":"address"}],
                              [{"dataKey":"dateType","data":[],"title":"绑定工序Id","field":"GongXuId","type":"select"}],
                              [{"title":"绑定工序Name","field":"GongXuName"}],
                              [{"title":"备注","field":"remark"}]]);
            const searchFormFields = ref({"warehouse_no":"","warehouse_name":"","address":"","remark":""});
            const searchFormOptions = ref([[{"title":"仓库编号","field":"warehouse_no"}],[{"title":"仓库名称","field":"warehouse_name"}],[{"title":"仓库位置","field":"address"}],[{"title":"备注","field":"remark"}]]);
            const columns = ref([{field:'Id',title:'id，主键，自增',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'warehouse_no',title:'仓库编号',type:'string',width:220,align:'left',sort:true},
                       {field:'warehouse_name',title:'仓库名称',type:'string',width:220,align:'left'},
                       {field:'address',title:'仓库位置',type:'string',width:220,align:'left'},
                       {field:'create_time',title:'创建时间',type:'string',width:220,align:'left'},
                       {field:'status',title:'状态，0启用，1禁用',type:'int',width:110,hidden:true,align:'left'},
                       {field:'type',title:'仓库类型，1原料库，2成品库，3半成品库，4下料库',type:'int',width:110,hidden:true,align:'left'},
                       {field:'remark',title:'备注',type:'string',width:110,align:'left'},
                       {field:'GongXuId',title:'绑定工序Id',type:'string',bind:{ key:'dateType',data:[]},width:220,hidden:true,align:'left'},
                       {field:'GongXuName',title:'绑定工序Name',type:'string',width:220,hidden:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
